| Total Complexity | 5 | 
| Total Lines | 46 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | import {Entity, Column, PrimaryGeneratedColumn} from 'typeorm'; | ||
| 2 | |||
| 3 | @Entity() | ||
| 4 | export class File { | ||
| 5 |   @PrimaryGeneratedColumn('uuid') | ||
| 6 | private id: string; | ||
| 7 | |||
| 8 |   @Column({type: 'varchar', nullable: false}) | ||
| 9 | private name: string; | ||
| 10 | |||
| 11 |   @Column({type: 'integer', nullable: false}) | ||
| 12 | private size: number; | ||
| 13 | |||
| 14 |   @Column({type: 'varchar', nullable: false}) | ||
| 15 | private mimeType: string; | ||
| 16 | |||
| 17 |   @Column({type: 'varchar', nullable: false}) | ||
| 18 | private password: string; | ||
| 19 | |||
| 20 |   @Column({type: 'timestamp', default: () => 'CURRENT_TIMESTAMP'}) | ||
| 21 | private uploadedAt: Date; | ||
| 22 | |||
| 23 |   constructor(name: string, size: number, mimeType: string, password: string) { | ||
| 24 | this.name = name; | ||
| 25 | this.size = size; | ||
| 26 | this.mimeType = mimeType; | ||
| 27 | this.password = password; | ||
| 28 | } | ||
| 29 | |||
| 30 |   public getId(): string { | ||
| 31 | return this.id; | ||
| 32 | } | ||
| 33 | |||
| 34 |   public getName(): string { | ||
| 35 | return this.name; | ||
| 36 | } | ||
| 37 | |||
| 38 |   public getSize(): number { | ||
| 39 | return this.size; | ||
| 40 | } | ||
| 41 | |||
| 42 |   public getMimeType(): string { | ||
| 43 | return this.mimeType; | ||
| 44 | } | ||
| 45 | |||
| 46 |   public getPassword(): string { | ||
| 47 | return this.password; | ||
| 48 | } | ||
| 50 |